package com.cryptoneedle.garden.repository.doris;


import com.bubbles.engine.data.core.repository.BaseRepository;
import com.cryptoneedle.garden.entity.doris.DorisInformationColumn;
import com.cryptoneedle.garden.key.ColumnKey;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>description: Doris-元数据-Column </p>
 *
 * @author CryptoNeedle
 * @date 2025-09-25
 */
@Repository
public interface DorisInformationColumnRepository extends BaseRepository<DorisInformationColumn, ColumnKey> {

    @Query("""
            FROM DorisInformationColumn
            WHERE catalogName = :catalogName
            AND databaseName = :databaseName
            """)
    List<DorisInformationColumn> dorisInformationColumn(String catalogName, String databaseName);

    @Query("""
            FROM DorisInformationColumn
            WHERE catalogName = :catalogName
            AND databaseName = :databaseName
            AND tableName = :tableName
            """)
    List<DorisInformationColumn> dorisInformationColumn(String catalogName, String databaseName, String tableName);
}